# -*- coding: utf-8 -*-
"""
Created on Wed Apr 19 10:31:29 2017

@author: BaiYunfei
"""
import json


class Comment:
    
    def __init__(self, title='', author='', content='', publish_date='', replys=[]):
        self.title = title
        self.author = author
        self.content = content
        self.publish_date = publish_date
        self.replys = replys
    
    def to_json(self):
        return json.dumps(self.__dict__)
        
    def set_content(self, content):
        self.content = content
    
    def set_author(self, author):
        self.content = author